package examination;

// 本题为考试单行多行输入输出规范示例，无需提交，不计分。
import java.util.Scanner;
/**
 * Created by zxc on 2018/9/26.
 */

public class InputDemo {
    public static void main11(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextInt()) {//注意while处理多个case
            int a = in.nextInt();
            int b = in.nextInt();
            System.out.println(a + b);
        }
    }

    public static void main1(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int ans = 0, x;
        for(int i = 0; i < n; i++){
            for(int j = 0; j < n; j++){
                x = sc.nextInt();
                ans += x;
            }
        }
        System.out.println(ans);
    }

    /*牛客网输入一个矩阵二维数组*/
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int[][] arr = new int[n][m];
        int  x;
        for(int i = 0; i < n; i++){
            for (int j = 0; j < m; j++) {
                if (sc.hasNext()){
                    x = sc.nextInt();
                    arr[i][j] = x;
                }
            }
        }

        System.out.println(arr);
    }

}
